<#assign module="driver"/>

<@override name="header">
    <link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
    <link rel="stylesheet" href="${ctx}/assets/css/bootstrap-multiselect.css">
    <link href="${ctx}/assets/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="${ctx}/assets/css/font-awesome.css"/>
    <link rel="stylesheet" href="${ctx}/assets/css/build.css"/>
    <style>
        .input-query-multiple {
            min-width: 300px;
            padding: 0px 0px;
            height: auto;
            margin-top: 20px;
        }
    </style>
</@override>
<@override name="body">
    <div id = "app">
        <div class="tabbable tabs-left">
            <div class="row">
                <div class="col-xs-12 col-md-10">
                    <div class="orders-navt">
                        <ul class="orders-nav">
                            <@shiro.hasPermission name='servicePersonal'>
                                <li class="orders-click" style="width:90px;"><a href="${ctx}/driver/list" class="orders-click-a">服务人员</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='drivergrade'>
                                <li style="width:110px;"><a href="${ctx}/drivergrade/list">服务人员等级</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='driverapply'>
                                <li><a href="${ctx}/driverapply/list">申请</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='callLog'>
                                <li style="width:90px;"><a href="${ctx}/driver/recordlist">通话记录</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='notice'>
                                <li><a href="${ctx}/notice/list">通知</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='announcement'>
                                <li style="width:90px;"><a href="${ctx}/driver/announcementList">公告</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='drivermoney'>
                                <li style="width:90px;"><a href="${ctx}/driver/drivermoney">批量操作</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='drivermoney'>
                                <li style="width:110px;"><a href="${ctx}/driver/driverReward">服务人员奖励</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='driverenchashment'>
                                <li style="width:100px;"><a href="${ctx}/driverenchashment/list">申请提现</a></li>
                                <li style="width:120px;"><a href="${ctx}/driverRebateenchashment/extendList">申请提取推广奖励</a></li>
                            </@shiro.hasPermission>
                            <@shiro.hasPermission name='driverloginrecord'>
                                <li style="width:90px;"><a href="${ctx}/driver/loginlist">登录日志</a></li>
                            </@shiro.hasPermission>
                        </ul>
                    </div>
                </div>

                <div class="col-xs-4 col-md-2" style=" padding: 0px 20px 15px 5px;">
                    <@shiro.hasPermission name='driveradd'>
                        <div class="orders-navh">
                            <div class="btn-group">
                                <a href="#" data-value="20" type="button"
                                   style="height: 30px;line-height: 30px;margin-top: 20px;margin-left: 20px;font-size: 14px;"
                                   class="btn btn-primary btn-xs addCar" onclick="window.location='${ctx}/driver/add';">新增服务人员</a>
                                <@jgpt>
                                    <button type="button" class="btn btn-primary btn-xs dropdown-toggle"
                                            style="height: 30px;margin-top: 20px;" data-toggle="dropdown"
                                            aria-expanded="false">
                                        <span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
                                    <ul class="dropdown-menu" role="menu">
                                        <li style="cursor:pointer;">
                                            <a href="#" data-value="20" id="upload_button" class="btn-link">上报服务人员信息</a>
                                        </li>
                                    </ul>
                                </@jgpt>
                            </div>
                        </div>
                    </@shiro.hasPermission>
                    <button class="pull-right buttoncss importDriver" style="margin-top: 20px"><span
                                class="glyphicon glyphicon-cloud-upload"></span>&nbsp;导入
                    </button>
                </div>
            </div>
        </div>

        <input type="text" style="display:none;" name="username"/>
        <div class="tab-content">
            <div class="container-fluid ">
                <div class="row query-pad">
                    <div class="col-xs-10" style="padding: 0px;">
                        <div class="col-xs-4 input-query">
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;姓名：</span>
                            <input type="text" class="form-control form-contb" id="driverName" name="param" value=""
                                   placeholder="请输入服务人员姓名"/>
                        </div>
                        <div class="col-xs-4 input-query">
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电话：</span>
                            <input type="text" class="form-control form-contb" id="driverPhone" name="param" value=""
                                   placeholder="请输入服务人员电话"/>
                        </div>
                        <div class="col-xs-4 input-query">
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;工号：</span>
                            <input type="text" class="form-control form-contb" id="driverNumber" name="param" value=""
                                   placeholder="请输入服务人员工号"/>
                        </div>

                    </div>
                    <div class="col-xs-2" style="padding: 0px;">
                        <i-button id="searchButton"  icon="ios-search">查询</i-button>
                        <@shiro.hasPermission name='driverExport'>
<#--                            <div class="input-query-bttom ">-->
<#--                                <button id="export_button" style="margin-left:10px;" type="button" class="btn btn-primary">-->
<#--                                    <i class="glyphicon glyphicon-save"></i>导出-->
<#--                                </button>-->
<#--                            </div>-->
                            <i-button id="export_button" type="primary" icon="ios-cloud-download">导出</i-button>
                        </@shiro.hasPermission>


                        <i-button id="updateDrivers" type="primary" @click="updateDrivers">批量操作</i-button>
                    </div>
                </div>
                <div class="choose" style="display: none;">
                    <div class="col-xs-12" style="padding: 0px;">
                        <div class="col-xs-11" style="padding: 5px;">
                            <div class="col-xs-4 input-query">
                                <span>余额少于：</span>
                                <input type="text" class="form-control form-contb" id="virtual" name="param" value=""
                                       placeholder="请输入服务人员余额"/>
                            </div>
                            <div class="col-xs-4 input-query" style="text-align: center;">
                                <span>入职时间：</span>
                                <input type="text" class="form-control form-conthtl" id="startTime" name="startTime"
                                       placeholder="入职起始时间"/>
                                <span style="width:5%">到</span>
                                <input type="text" class="form-control form-conthtl" id="endTime" name="endTime"
                                       placeholder="入职结束时间"/>
                            </div>
                            <@shiro.isMainCompany>
                                <div class="col-xs-4 input-query-multiple">
                                    <span>所属公司：</span>
                                    <select class="form-control form-conthtl" id="companyId" multiple="multiple"
                                            style="width:70%;padding:0 0 0 4px;">
                                        <#list companys as company>
                                            <option value="${company.id}">${company.abbreviation}</option>
                                        </#list>
                                    </select>
                                </div>
                            </@shiro.isMainCompany>
                        </div>
                    </div>

                    <div class="col-xs-12" style="padding: 0px; line-height:3;">
                        <div class="col-xs-12" style="padding: 5px;">
                            <div class="media-wit melect col-xs-4">
                                <span>&nbsp;&nbsp;&nbsp;状态：</span>
                                <input type="checkbox" name="status" value="1">
                                <span class="checkbox-margin">上线</span>
                                <input type="checkbox" name="status" value="2">
                                <span class="checkbox-margin">派单</span>
                                <input type="checkbox" name="status" value="3">
                                <span class="checkbox-margin">忙碌</span>
                                <input type="checkbox" name="status" value="0">
                                <span class="checkbox-margin">下线</span>
                                <input type="checkbox" name="freeze" value="isFreeze" id="freeze">
                                <span class="checkbox-margin">冻结</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12" style="padding: 0px; line-height:3;">
                        <div class="col-xs-12" style="padding: 5px;">
                            <div class="media-hit melect">
                                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类型：</span>
                                <input type="checkbox" name="type" value="兼职">
                                <span class="checkbox-margin">兼职</span>
                                <input type="checkbox" name="type" value="全职">
                                <span class="checkbox-margin">全职</span>

                                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类型：</span>
                                <input type="radio" name="isLeague" class = "isLeague" value="false">
                                <span class="radio-margin">自营</span>
                                <input type="radio" name="isLeague"  class = "isLeague" value="true">
                                <span class="radio-margin">加盟</span>
                            </div>
                        </div>
                    </div>
                    <@jgpt>
                        <div class="col-xs-12" style="padding: 0px; line-height:3;">
                            <div class="col-xs-12" style="padding: 5px;">
                                <div class="media-hit">
                                    <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否已上传监管平台：</span>
                                    <input type="checkbox" name="isPlatform" value="1">
                                    <span class="checkbox-margin">已上传</span>
                                    <input type="checkbox" name="isPlatform" value="0">
                                    <span class="checkbox-margin">未上传</span>
                                </div>
                            </div>
                        </div>
                    </@jgpt>
                </div>
                <div class="query-jiant">
                    <a href="#"><img id="jiant" src="${ctx}/assets/img/jiant2.png"/></a>
                </div>
            </div>
        </div>

        <!--列表-->
        <div class="tabta-content">
            <table class="table table-condensed table-striped">
                <tbody>
                <tr>
                    <@jgpt>
                        <th style=''>
                            <div id="checkAll" style='margin-top:0px;'>
                                <input id='all' class='' val="false" type='checkbox'/>
                                <label for="all"></label>
                            </div>
                        </th>
                    </@jgpt>
                    <th style='min-width:80px;'>操作</th>
                    <@jgpt>
                        <th style='min-width:100px;'>是否已上传</th>
                    </@jgpt>
                    <th style='min-width:120px;text-align: center'>姓名</th>
                    <th style='min-width:120px;'>工号</th>
                    <th style='min-width:120px;'>昵称</th>
                    <th style='min-width:120px;'>手机号</th>
                    <th style='min-width:120px;'>余额<span style="color:#ff950b;font-weight:700;">(元)</span></th>
                    <th style='min-width:120px;'>员工类型</th>
                    <th style='min-width:120px;'>状态</th>
                    <@daijia>
                        <th style='min-width:120px;'>代驾</th>
                    </@daijia>
                    <@zhuan>
                        <th style='min-width:120px;'>专车</th>
                    </@zhuan>
                    <@pao>
                        <th style='min-width:120px;'>跑腿</th>
                    </@pao>
                    <@freight>
                        <th style='min-width:120px;'>货运</th>
                    </@freight>
                    <@zhuanxian>
                        <th style='min-width:120px;'>专线</th>
                        <th style='min-width:120px;'>等级</th>
                    </@zhuanxian>
                    <th style='min-width:120px;'>APP版本</th>
                    <th style='min-width:120px;'>入职时间</th>
                    <@shiro.isMainCompany>
                        <th style='min-width:120px;'>所属公司</th>
                    </@shiro.isMainCompany>
                    <th style='min-width:120px;'>上传时间</th>
                    <th style='min-width:120px;'>操作</th>
                </tr>
                </tbody>
            </table>
            <br>
            <div style="text-align:center" id="NoData"></div>
            </br>
            <ul class="pagination pull-left pagination-sm pageshow" id="pageshow" style="display:none;">
                <li><a></a></li>
            </ul>
            <ul class="pagination pull-left pagination-sm pagedata" id="pagedata" style="display:none;">
            </ul>
        </div>

        <div class="modal" id="dialog_password">
            <div class="modal-dialog" style="top:150px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                        </button>
                        <h4 class="modal-title">修改<span id="dialog_whose"></span>的密码（新密码将通过短信告知服务人员）</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><em style="color:red">*</em>新密码：</label>
                                <div class="col-sm-5">
                                    <input class="form-control" id="password" type="password" required
                                           placeholder="6到30个字符，数字、字母组合"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><em style="color:red">*</em>确认密码：</label>
                                <div class="col-sm-5">
                                    <input class="form-control" id="passwordconfirm" type="password" required>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" id="ok_modal">确定</button>
                        <button type="button" class="btn btn-default close_modal">取消</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>

        <div id="dialog_deviceInfo" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
             aria-labelledby="mySmallModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                        </button>
                        <h4 class="modal-title">设备信息</h4>
                    </div>
                    <div class="modal-body">
                        <div id="deviceInfo_loading_div">
                            <center><i class="icon-spinner icon-spin icon-large"></i> &nbsp; 获取中...</center>
                        </div>
                        <div id="deviceInfo_complete_div" style="display:none;">
                            <div class="form-group">
                                <label>手机型号：</label>
                                <span id="mobileVersion_span"></span>
                            </div>
                            <div class="form-group">
                                <label>系统版本：</label>
                                <span id="systemVersion_span"></span>
                            </div>
                            <div class="form-group">
                                <label>wifi：</label>
                                <span id="wifi_span"></span>
                            </div>
                            <div class="form-group">
                                <label>gps：</label>
                                <span id="gps_span"></span>
                            </div>
                            <div class="form-group">
                                <label>后台运行：</label>
                                <span id="runningBackground_span"></span>
                            </div>
                            <div class="form-group">
                                <label>root：</label>
                                <span id="root_span"></span>
                            </div>
                            <div class="form-group">
                                <label>网络类型：</label>
                                <span id="networkType_span"></span>
                            </div>
                            <div class="form-group">
                                <label>运营商：</label>
                                <span id="operatorName_span"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade" id="importDriverModal">
            <div class="modal-dialog "><!--modal-lg-->
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span
                                    aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title">请选择Excel文件</h4>
                    </div>
                    <div class="modal-body" style="height:20px;padding:10px 0 30px 0;">
                        <div class="col-sm-12" style="height:40px;">
                            <#if isJgpt>
                                <#if isUpPlatformInfo>
                                    <a href="#" id="downloadTemplet" url="/assets/template/driverPlatformTemplat.xlsx">下载导入模板</a>
                                <#else>
                                    <a href="#" id="downloadTemplet" url="/assets/template/driverTemplat.xlsx">下载导入模板</a>
                                </#if>
                            <#else>
                                <a href="#" id="downloadTemplet" url="/assets/template/driverTemplat.xlsx">下载导入模板</a>
                            </#if>
                        </div>
                        <div class="col-sm-12">
                        </div>
                        <div class="col-sm-12">
                            <div class="form-group">
                                <input id="driverExcel" name="driverExcel" type="file" multiple class="file-loading"
                                       data-min-file-count="1" data-overwrite-initial="true">
                                <!--data-overwrite-initial="false"  data-min-file-count="2"-->
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <!-- <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>-->
                        <!--<button type="button" class="btn  btn-default">Save changes</button>-->
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <div class="modal fade" tabindex="-1" id="uploadDriverModal" role="dialog">
            <div class="modal-dialog modal-sm" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="dataCheck">数据校验中<span class="loading"
                                                                          style="margin: -60px 0 0 -120px;"></span></h4>
                    </div>
                    <div class="modal-body">
                        <div class="progress" id="progressDiv">
                            <div id="loading" class="progress-bar progress-bar-info progress-bar-striped"
                                 role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"
                                 style="width: 10%">
                            </div>
                        </div>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <!--上传等待-->
        <div class="modal fade" tabindex="-1" id="waitUpDriver" role="dialog">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">上传中，请耐心等待……<span class="loading" style="margin: -60px 0 0 -120px"></span>
                    </h4>
                </div>
                <div class="modal-body" style="text-align: center">
                    <div class="progress" id="waitDiv">
                        <div id="loading" class="progress-bar progress-bar-info progress-bar-striped" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                        </div>
                    </div>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->


        <input type="hidden" id="company" value="<#if company??>${company.id?if_exists}</#if>">
        <template>
            <Modal v-model="iModel"  title="批量修改" @on-ok="updateSomeDrivers">
                <i-form v-model="formItem" >
                    <Form-Item label="是否允许提现：">
                        <i-switch v-model="formItem.tixian" size="large" name="tixian">
                            <span slot="open">开</span>
                            <span slot="close">关</span>
                        </i-switch>
                    </Form-Item>

                    <Form-Item label="是否允许推广：">
                        <i-switch v-model="formItem.tuiguang" size="large" name="tuiguang">
                            <span slot="open">开</span>
                            <span slot="close">关</span>
                        </i-switch>
                    </Form-Item>

                    <Form-Item label="推荐百分比：">
                        <input-Number :max="100" :min="0" v-model="formItem.driverRebate" name="driverRebate"></input-Number> <span>&nbsp; %<span>
                    </Form-Item>
                    <Form-Item label="专车提成：">
                        <i-select v-model="formItem.zcDeduct" filterable clearable name="zcDeduct">
                            <i-option v-for="item in driverLevel" :value="item.value" :key="item.value">{{ item.label }}</i-option>
                        </i-select>
                    </Form-Item>
                    <Form-Item label="专线拼车提成：">
                        <i-select v-model="formItem.zxpcDeduct" filterable clearable name="zxpcDeduct">
                            <i-option v-for="item in driverLevel" :value="item.value" :key="item.value">{{ item.label }}</i-option>
                        </i-select>
                    </Form-Item>
                    <Form-Item label="专线包车提成：">
                        <i-select v-model="formItem.zxbcDeduct" filterable clearable name="zxbcDeduct">
                            <i-option v-for="item in driverLevel" :value="item.value" :key="item.value">{{ item.label }}</i-option>
                        </i-select>
                    </Form-Item>
                    <Form-Item label="专线寄货提成：">
                        <i-select v-model="formItem.zxjhDeduct" filterable clearable name="zxjhDeduct">
                            <i-option v-for="item in driverLevel" :value="item.value" :key="item.value">{{ item.label }}</i-option>
                        </i-select>
                    </Form-Item>
                </i-form>
            </Modal>
        </template>
    </div>

</@override>



<@override name="footer">

    <script type="text/javascript">
        <#if smsMessage??>
        $.scojs_message("服务人员密码短信发送失败，错误代码${smsMessage}", $.scojs_message.TYPE_ERROR);
        </#if>

    </script>

    <script type="text/javascript">
        window.daijia = {
            ctx: '${ctx}',
            userId: '<@shiro.principal property='id'/>'
        };
        <@jgpt>
        window.jgpt = true;
        </@jgpt>
        window.isUpPlatformInfo = "${isUpPlatformInfo?string('true', 'false')}";
        window.isDriverBindPhone = "${isDriverBindPhone?string('true', 'false')}";
        var driverdelete = false;
        var rate = false;
        var drivermoneyview = false;
        var driveredit = false;
        var mainCompany = false;
        var dj = false;
        var zhuan = false;
        var pao = false;
        var freight = false;
        var zhuanxian = false;
        <@daijia>
        dj = true;
        </@daijia>
        <@zhuan>
        zhuan = true;
        </@zhuan>
        <@pao>
        pao = true;
        </@pao>
        <@freight>
        freight = true;
        </@freight>
        <@zhuanxian>
        zhuanxian = true;
        </@zhuanxian>
        <@shiro.hasPermission name='driverdelete'>
        driverdelete = true;
        </@shiro.hasPermission>
        <@shiro.hasPermission name='rate'>
        rate = true;
        </@shiro.hasPermission>
        <@shiro.hasPermission name='drivermoneyview'>
        drivermoneyview = true;
        </@shiro.hasPermission>
        <@shiro.hasPermission name='driveredit'>
        driveredit = true;
        </@shiro.hasPermission>
        <@shiro.isMainCompany>
        mainCompany = true;
        </@shiro.isMainCompany>

    </script>
    <script type="text/javascript">
        var vue = new Vue({
            el:"#app",
            data(){
                return {
                    tixian:false,
                    tuiguang:false,
                    iModel:false,
                    formItem: {
                        tixian: true,
                        tuiguang: true,
                        driverRebate:0,
                        zcDeduct:0,
                        zxpcDeduct:0,
                        zxbcDeduct:0,
                        zxjhDeduct:0,
                    },
                    driverLevel:[]
                }
            },
            mounted:function(){
                var vm = this;
                var isMainCompany = mainCompany;
                var companyId = $("#company").val();

                $.ajax({
                    url: window.daijia.ctx+"/driver/queryLevels",
                    type: "get",
                    data: {
                        "isMainCompany": isMainCompany,
                        "companyId": companyId,
                    },
                    dataType: "json",
                    success: function(result){
                        $.each(result,function(i,item){
                            var driverLevel = {};
                            driverLevel.value = item.id;
                            driverLevel.label = item.name;
                            vm.driverLevel.push(driverLevel);
                        })
                    }
                })
            },
            methods: {
                updateDrivers:function () {
                    var vm = this;
                    if(upload_driver > 0){
                        vm.iModel?vm.iModel=false:vm.iModel=true;
                    } else {
                        this.$Message.error('请选择服务人员！');
                    }
                },
                updateSomeDrivers:function(){
                    var vm = this;
                    var driverRebate = vm.formItem.driverRebate;
                    var zcDeduct = vm.formItem.zcDeduct;
                    var zxpcDeduct = vm.formItem.zxpcDeduct;
                    var zxbcDeduct = vm.formItem.zxbcDeduct;
                    var zxjhDeduct = vm.formItem.zxjhDeduct;
                    var param = {};
                    if(driverRebate > 0){
                        param.driverRebate = driverRebate;
                    }
                    if(0 != zcDeduct && 'undefined' != zcDeduct){
                        param.zcDeduct = zcDeduct;
                    }
                    if(0 != zxpcDeduct && 'undefined' != zxpcDeduct){
                        param.zxpcDeduct = zxpcDeduct;
                    }
                    if(0 != zxbcDeduct && 'undefined' != zxbcDeduct){
                        param.zxbcDeduct = zxbcDeduct;
                    }
                    if(0 != zxjhDeduct && 'undefined' != zxjhDeduct){
                        param.zxjhDeduct = zxjhDeduct;
                    }
                    param.tixian=vm.formItem.tixian?1:0;
                    param.tuiguang=vm.formItem.tuiguang?1:0;
                    var drivers = "";
                    if(upload_driver.length > 0){
                        for(var i = 0;i < upload_driver.length;i++){
                            drivers += upload_driver[i];
                            drivers += ",";
                        }
                    }
                    param.drivers = drivers.substring(0,drivers.length-1);
                    console.log("tixian:"+ param.tixian + ", tuiguang:"+ param.tuiguang + ", driverRebate:"+ param.driverRebate + ", zcDeduct:"+ param.zcDeduct +
                        ", zxpcDeduct:"+ param.zxpcDeduct + ", zxbcDeduct:"+ param.zxbcDeduct + ", zxjhDeduct:"+ param.zxjhDeduct + ", drivers:"+ param.drivers);
                    $.ajax({
                        url: window.daijia.ctx+"/driver/updateSomeDrivers",
                        type: "post",
                        dataType: "json",
                        data: param,
                        success: function(result){
                            vm.formItem.tixian = true;
                            vm.formItem.tuiguang = true;
                            vm.formItem.driverRebate = 0;
                            vm.formItem.zcDeduct = 0;
                            vm.formItem.zxpcDeduct = 0;
                            vm.formItem.zxbcDeduct = 0;
                            vm.formItem.zxjhDeduct = 0;
                        }
                    })
                }
            }
        })
    </script>
    <script src="${ctx}/assets/js/bootstrap-multiselect.js"></script>
    <script src="${ctx}/assets/js/jquery.paging.min.js"></script>
    <script src="${ctx}/assets/js/datepicker.js"></script>
    <script src="${ctx}/assets/js/fileinput.js" type="text/javascript"></script>
    <script src="${ctx}/assets/js/fileinput_locale_zh.js" type="text/javascript"></script>

    <script src="${ctx}/assets/js/driver/driverlist.js"></script>
    <script src="${ctx}/assets/js/driver.js"></script>


</@override>
<@extends name="../layout.ftl"/>
